﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Result
{
    public partial class FormResult : Form
    {
        //勝敗結果用変数宣言
        long ResultF;

        public FormResult(long ResultFlag)
        {
            //受け取った勝敗結果を設定
            ResultF = ResultFlag;

            InitializeComponent();
        }

        private void FormResult_Load(object sender, EventArgs e)
        {
            //勝敗メッセージ設定
            const string WINNER = "You are Winner!!";
            const string LOSER = "You are Loser...";
            const string DRAW = "Draw Match";

            //勝敗結果で出力するメッセージを設定
            switch (ResultF)
            {
                case 1:
                    this.LabelResult.Text = WINNER;
                    break;
                case 2:
                    this.LabelResult.Text = LOSER;
                    break;
                default:
                    this.LabelResult.Text = DRAW;
                    break;
            }        
        }

        private void ReturnButton_Click(object sender, EventArgs e)
        {
            //////メイン画面呼び出し(作成中)
            //Main_Ohello_Game.Main_Othello_Game FormMain = new Main_Ohello_Game.Main_Othello_Game();
            //FormMain = this;
            //FormMain.show();
            
            //自画面を閉じる
            this.Close();
        }
    }
}
